import { defineStore } from "pinia";
import { createPersistedState } from "pinia-plugin-persistedstate";

export const useUserStore = defineStore("showData", {
  state() {
    return {
      // 人才培养
      talentTraining: {
        indicators: [
          {
            curValue: "331",
            name: "中小学智慧教育平台",
          },
          {
            curValue: "74",
            name: "重庆职业教育智慧教育平台",
          },
          {
            curValue: "208",
            name: "重庆高等教育智慧教育平台",
          },
          {
            curValue: "80",
            name: "重庆终身学习学分银行数字化平台",
          },
        ],
        kpiIndicators: [
          {
            curValue: "1",
            name: "KPI",
          },
          {
            curValue: "6",
            name: "体征指标",
          },
          {
            curValue: "2",
            name: "多跨事件",
          },
        ],
      },
      //服务发展
      serviceDevelopment: {
        indicators: [
          {
            curValue: "--",
            name: "教育强市区县行",
          },
          {
            curValue: "--",
            name: "产教融合",
          },
          {
            curValue: "--",
            name: "科教融汇",
          },
          {
            curValue: "--",
            name: "教育服务公众",
          },
          {
            curValue: "--",
            name: "教育开放合作",
          },
          {
            curValue: "--",
            name: "校外教育培训",
          },
        ],
        kpiIndicators: [
          {
            curValue: "9",
            name: "KPI",
          },
          {
            curValue: "16",
            name: "体征指标",
          },
          {
            curValue: "8",
            name: "多跨事件",
          },
        ],
      },
      //学校治理
      schoolGovernance: {
        indicators: [
          {
            curValue: "100",
            name: "党组织覆盖率",
          },
          {
            curValue: "2.32",
            name: "智慧教育平台访问量",
          },
          {
            curValue: "69",
            name: "市级新时代依法治校示范校",
          },
          {
            curValue: "1413.72",
            name: "教育总投入",
          },
          {
            curValue: "100",
            name: "学生非正常死亡防范处置率",
          },
        ],
        kpiIndicators: [
          {
            curValue: "1",
            name: "KPI",
          },
          {
            curValue: "67",
            name: "体征指标",
          },
          {
            curValue: "2",
            name: "多跨事件",
          },
        ],
      },
      //质量体系
      QualitySystem: {
        indicators: [
          {
            curValue: "81.36",
            name: "思想政治教育体系建设指数",
          },
          {
            curValue: "78.3",
            name: "终身教育体系建设指数",
          },
          {
            curValue: "81.12",
            name: "科技支撑体系建设指数",
          },
          {
            curValue: "80.43",
            name: "基础教育体系建设指数",
          },
          {
            curValue: "81.39",
            name: "高等教育体系建设指数",
          },
          {
            curValue: "77.21",
            name: "职业教育体系建设指数",
          },
        ],
        kpiIndicators: [
          {
            curValue: "1",
            name: "KPI",
          },
          {
            curValue: "6",
            name: "体征指标",
          },
          {
            curValue: "6",
            name: "多跨事件",
          },
        ],
      },
      //师资队伍
      faculty: {
        indicators: [
          {
            curValue: "3225",
            name: "高校思政课教师",
          },
          {
            curValue: "73",
            name: "小学专任教师本科及以上学历占比",
          },
          {
            curValue: "3.6",
            name: "2023年发放乡村教师补助",
          },
          {
            curValue: "17",
            name: "全国模范教师",
          },
        ],
        kpiIndicators: [
          {
            curValue: "1",
            name: "KPI",
          },
          {
            curValue: "6",
            name: "体征指标",
          },
          {
            curValue: "1",
            name: "多跨事件",
          },
        ],
      },
      //KPI数据
      kpiList: {
        totalCount: 42,
        results: [
          {
            areaName: "万州区",
            teachersTotalNumber: "22825",
            schoolsTotalNumber: "407",
            studentsTotalNumber: "326959",
          },
          {
            areaName: "綦江区",
            teachersTotalNumber: "9204",
            schoolsTotalNumber: "176",
            studentsTotalNumber: "106936",
          },
          {
            areaName: "大足区",
            teachersTotalNumber: "15312",
            schoolsTotalNumber: "314",
            studentsTotalNumber: "195144",
          },
          {
            areaName: "渝北区",
            teachersTotalNumber: "24757",
            schoolsTotalNumber: "407",
            studentsTotalNumber: "294717",
          },
          {
            areaName: "巴南区",
            teachersTotalNumber: "20523",
            schoolsTotalNumber: "319",
            studentsTotalNumber: "264592",
          },
          {
            areaName: "黔江区",
            teachersTotalNumber: "9299",
            schoolsTotalNumber: "214",
            studentsTotalNumber: "121856",
          },
          {
            areaName: "长寿区",
            teachersTotalNumber: "9366",
            schoolsTotalNumber: "219",
            studentsTotalNumber: "100010",
          },
          {
            areaName: "江津区",
            teachersTotalNumber: "19593",
            schoolsTotalNumber: "373",
            studentsTotalNumber: "283609",
          },
          {
            areaName: "合川区",
            teachersTotalNumber: "18761",
            schoolsTotalNumber: "308",
            studentsTotalNumber: "271374",
          },
          {
            areaName: "永川区",
            teachersTotalNumber: "20769",
            schoolsTotalNumber: "294",
            studentsTotalNumber: "340385",
          },
          {
            areaName: "南川区",
            teachersTotalNumber: "7379",
            schoolsTotalNumber: "191",
            studentsTotalNumber: "90698",
          },
          {
            areaName: "涪陵区",
            teachersTotalNumber: "15609",
            schoolsTotalNumber: "292",
            studentsTotalNumber: "193574",
          },
          {
            areaName: "璧山区",
            teachersTotalNumber: "9523",
            schoolsTotalNumber: "227",
            studentsTotalNumber: "131730",
          },
          {
            areaName: "铜梁区",
            teachersTotalNumber: "9025",
            schoolsTotalNumber: "195",
            studentsTotalNumber: "127085",
          },
          {
            areaName: "潼南区",
            teachersTotalNumber: "10506",
            schoolsTotalNumber: "212",
            studentsTotalNumber: "102746",
          },
          {
            areaName: "荣昌区",
            teachersTotalNumber: "8935",
            schoolsTotalNumber: "236",
            studentsTotalNumber: "103012",
          },
          {
            areaName: "开州区",
            teachersTotalNumber: "15717",
            schoolsTotalNumber: "329",
            studentsTotalNumber: "217636",
          },
          {
            areaName: "梁平区",
            teachersTotalNumber: "8423",
            schoolsTotalNumber: "183",
            studentsTotalNumber: "104430",
          },
          {
            areaName: "武隆区",
            teachersTotalNumber: "4666",
            schoolsTotalNumber: "117",
            studentsTotalNumber: "47652",
          },
          {
            areaName: "城口县",
            teachersTotalNumber: "2978",
            schoolsTotalNumber: "71",
            studentsTotalNumber: "38772",
          },
          {
            areaName: "丰都县",
            teachersTotalNumber: "8943",
            schoolsTotalNumber: "207",
            studentsTotalNumber: "83496",
          },
          {
            areaName: "垫江县",
            teachersTotalNumber: "9202",
            schoolsTotalNumber: "195",
            studentsTotalNumber: "105857",
          },
          {
            areaName: "渝中区",
            teachersTotalNumber: "10124",
            schoolsTotalNumber: "121",
            studentsTotalNumber: "109689",
          },
          {
            areaName: "忠县",
            teachersTotalNumber: "8711",
            schoolsTotalNumber: "286",
            studentsTotalNumber: "109950",
          },
          {
            areaName: "云阳县",
            teachersTotalNumber: "13130",
            schoolsTotalNumber: "246",
            studentsTotalNumber: "150170",
          },
          {
            areaName: "奉节县",
            teachersTotalNumber: "9554",
            schoolsTotalNumber: "240",
            studentsTotalNumber: "120354",
          },
          {
            areaName: "巫山县",
            teachersTotalNumber: "6705",
            schoolsTotalNumber: "182",
            studentsTotalNumber: "78862",
          },
          {
            areaName: "巫溪县",
            teachersTotalNumber: "5779",
            schoolsTotalNumber: "153",
            studentsTotalNumber: "71155",
          },
          {
            areaName: "石柱土家族自治县",
            teachersTotalNumber: "6174",
            schoolsTotalNumber: "167",
            studentsTotalNumber: "68863",
          },
          {
            areaName: "秀山土家族苗族自治县",
            teachersTotalNumber: "8815",
            schoolsTotalNumber: "264",
            studentsTotalNumber: "104358",
          },
          {
            areaName: "酉阳土家族苗族自治县",
            teachersTotalNumber: "10344",
            schoolsTotalNumber: "268",
            studentsTotalNumber: "130501",
          },
          {
            areaName: "彭水苗族土家族自治县",
            teachersTotalNumber: "7838",
            schoolsTotalNumber: "156",
            studentsTotalNumber: "96851",
          },
          {
            areaName: "两江新区",
            teachersTotalNumber: "12038",
            schoolsTotalNumber: "189",
            studentsTotalNumber: "126292",
          },
          {
            areaName: "大渡口区",
            teachersTotalNumber: "5871",
            schoolsTotalNumber: "107",
            studentsTotalNumber: "68404",
          },
          {
            areaName: "高新区",
            teachersTotalNumber: "7883",
            schoolsTotalNumber: "142",
            studentsTotalNumber: "107360",
          },
          {
            areaName: "万盛经济技术开发区",
            teachersTotalNumber: "3588",
            schoolsTotalNumber: "71",
            studentsTotalNumber: "32533",
          },
          {
            areaName: "重庆市",
            teachersTotalNumber: "500768",
            schoolsTotalNumber: "9772",
            studentsTotalNumber: "6151529",
          },
          {
            areaName: "江北区",
            teachersTotalNumber: "13833",
            schoolsTotalNumber: "234",
            studentsTotalNumber: "155593",
          },
          {
            areaName: "沙坪坝区",
            teachersTotalNumber: "29122",
            schoolsTotalNumber: "302",
            studentsTotalNumber: "378870",
          },
          {
            areaName: "九龙坡区",
            teachersTotalNumber: "21142",
            schoolsTotalNumber: "355",
            studentsTotalNumber: "246887",
          },
          {
            areaName: "南岸区",
            teachersTotalNumber: "24919",
            schoolsTotalNumber: "285",
            studentsTotalNumber: "299517",
          },
          {
            areaName: "北碚区",
            teachersTotalNumber: "16752",
            schoolsTotalNumber: "229",
            studentsTotalNumber: "212183",
          },
        ],
        totalData: {
          areaName: "重庆市",
          teachersTotalNumber: "746297",
          schoolsTotalNumber: "9772",
          studentsTotalNumber: "6146697",
        },
      },
      changenum: 0,
      // 区县/高校名称
      county: "",
      // 学校编码
      orgnazitionNo: "",
      // 类型：市级:city  区县:county  学校:school
      type: "city",
      //学校类型
      schoolRunningType: "",
      //学校数据
      schoolDetail: {},
      countyMapType: "",
      schooolMap: "",
      schooolMap1: 1,

      // 【人才培养】区县/高校名称
      tt_county: "",
      // 【人才培养】学校编码
      tt_orgnazitionNo: "",
      // 【人才培养】类型：市级:city  区县:county  学校:school
      tt_type: "city",
      // 【人才培养】学校类型
      tt_schoolRunningType: "",
      // 【人才培养】学校数据
      tt_schoolDetail: {},
      // tt_countyMapType: "",

      tt_schooolType:"",
      // 【人才培养】学校地图所属城市
      tt_schooolMap: "",
      // tt_schooolMap1: 1,


      
      // 【学校治理】区县/高校名称
      school_county: "",
      // 【学校治理】学校编码
      school_orgnazitionNo: "",
      // 【学校治理】类型：市级:city  区县:county  学校:school
      school_type: "city",
      // 【学校治理】学校类型
      school_schoolRunningType: "",
      // 【学校治理】学校数据
      school_schoolDetail: {},
      school_schoolType:"",
      // school_countyMapType: "",
      // 【学校治理】学校地图所属城市
      school_schooolMap: "",

    };
  },
  actions: {
    reset() {
      this.tt_county="";
      this.tt_orgnazitionNo="";
      this.tt_type= "city";
      this.tt_schoolRunningType= "";
      this.tt_schooolType = "";
      this.tt_schoolDetail= {};
      this.tt_schooolMap= "";

      this.school_county="";
      this.school_orgnazitionNo="";
      this.school_type= "city";
      this.school_schoolRunningType= "";
      this.school_schoolDetail= {};
      this.school_schooolMap= "";
    },
  },

  persist: true,
  plugins: [createPersistedState()],
});
